package com.mordenx.service;

import com.mordenx.dao.SecKillingMerchantDao;
import com.mordenx.entity.SecKillingMerchant;
import com.mordenx.vo.merchant.MerchantVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SecKillingMerchantService {
    @Autowired
    SecKillingMerchantDao secKillingMerchantDao;

    public SecKillingMerchant queryById(int id){
        return secKillingMerchantDao.queryById(id);
    }
    public SecKillingMerchant queryByName(String name){
        return  secKillingMerchantDao.queryByName(name);
    }
     public void insertMerchant(SecKillingMerchant secKillingMerchant){
        secKillingMerchantDao.insertMerchant(secKillingMerchant);
     }
    public void updateMerchantById(SecKillingMerchant secKillingMerchant){
         secKillingMerchantDao.updateMerchantById(secKillingMerchant);
    }

    public List<SecKillingMerchant> queryMerchantByVo(MerchantVo merchantVo){
        return secKillingMerchantDao.queryMerchantByVo(merchantVo);
    }

     public void deleteMerchantById(int id){
        secKillingMerchantDao.deleteMerchantById(id);
     }
}
